package com.duobaoyu.dby.supply.db.handler;

import com.duobaoyu.dby.saas.product.common.base.json.SaleAttribute;
import com.duobaoyu.dby.supply.core.common.handler.JsonZipTypeHandler;
import com.fasterxml.jackson.databind.JavaType;
import org.apache.ibatis.type.MappedTypes;

import java.util.ArrayList;
import java.util.List;

/**
 * @author liyang
 * @version 1.0.0
 * @ClassName SaleAttributeHandler
 * @Description 商品SKU销售属性类型处理器
 * @createTime 13:51:00 2022/05/25
 */
@MappedTypes(value = {List.class})
public class SaleAttributeTypeHandler extends JsonZipTypeHandler<List<SaleAttribute>> {

	public SaleAttributeTypeHandler(Class<List<SaleAttribute>> clazz) {
		super(clazz);
	}

	@Override
	public JavaType getJavaArrayType() {
		return getCollectionType(ArrayList.class, SaleAttribute.class);
	}
}
